#include "widget.h"
#include "ui_widget.h"
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->horizontalSlider->setSliderPosition(800);
    ui->horizontalSlider->setMaximum(1980);
    ui->horizontalSlider->setMinimum(100);
    ui->horizontalSlider->setSingleStep(50);

    ui->verticalSlider->setSliderPosition(600);
    ui->verticalSlider->setMaximum(1080);
    ui->verticalSlider->setMinimum(100);
    ui->verticalSlider->setSingleStep(50);
}

Widget::~Widget()
{
    delete ui;
}


//void Widget::on_dial_valueChanged(int value)
//{
//    qDebug()<<value;
//    this->setWindowOpacity((double)value/100);
//}

void Widget::on_horizontalSlider_valueChanged(int value)
{
    QRect ret = this->geometry();
    this->setGeometry(ret.x(),ret.y(),value,ret.height());
}

void Widget::on_verticalSlider_valueChanged(int value)
{
    QRect ret = this->geometry();
    this->setGeometry(ret.x(),ret.y(),ret.width(),value);
}
